Various apparatus have been developed to automate focusing of scanning electron microscopes. One example of such apparatus is disclosed in U.S. Pat. No. 4,199,681. Also, an apparatus of the construction shown in FIG. 3 is known.
Referring to FIG. 3, an electron beam 1 is focused onto a specimen 3 by an objective lens 2. A deflector 5 is driven in response to scanning signals produced by a scan generator 4. The electron beam on the specimen 3 is scanned in two dimensions by the deflector 5. As a result, secondary electrons are emitted from the specimen. These secondary electrons are detected by a secondary electron detector 6. The output signals from the detector 6 are converted into digital form by an analog-to-digital converter 7 and stored in a video memory incorporated in a display unit 8 in synchronism with the scan. An appropriate SEM image is displayed on the viewing screen of the display unit according to the stored data. The output signal from the detector 6 is supplied to the display unit 8 and also to an integrator 12 via a high-pass filter 10, and an absolute value circuit 11. The cutoff frequency of the high-pass filter 10 is selected to cut off noises from commercial frequencies. During one focusing step, i.e., at a given focal length, the objective lens 2 is excited according to a given current value set into an objective lens control circuit 13. The integrator 12 integrates the output signal from the absolute value circuit 11 whenever a scan is made at each different focal length. The output signal from the integrator 12 is stored via an analog-to-digital converter 14 in a memory 16 that exists within a central processing unit (CPU) 15. The integration period of integrator 12 is controllable. The signal is integrated during one set of scan lines (for example, during a single frame). The integrator is reset for the next set of scan lines at a new focal length. This processing for finding the integrated value is repeated with different values of exciting current supplied to the objective lens 2 for all the focusing steps, i.e., for every focal length. The results are successively stored in the memory 16. The values stored in the memory 16 are compared with each other by a comparator circuit 17. Data about the focal length which produced the greatest one of the compared values is supplied to the lens control circuit 13. Then, this control circuit 13 determines the exciting current that should be supplied to the objective lens from the data about the focal length. This exciting current is supplied to the objective lens 2 from a lens power supply 18, thus completing this focusing operation.
FIG. 4(a) shows the output signal from the integrator of the above-described automatic focusing apparatus. Where the unevenness of the surface of the specimen irradiated with the electron beam is relatively small, the integrator produces a signal as shown in this figure. On the other hand, where the specimen surface is very rough in the vertical direction and has sharp edges, the amount of secondary electrons emitted from the specimen surface increases in the following two cases. One case is where the focal point is approached. In other words, the electron beam spot size on the surface approaches the minimum value. The other case is where the electron beam spot size on the specimen surface is fairly large and the electron beam is not focused on the specimen surface. Therefore, as shown in FIG. 4(b), a plurality of peaks appear in the output signal from the integrator. This phenomenon is described in more detail below.
FIGS. 5(a) to 5(e) show the intensities of signals obtained when a specimen of a cross section having a shape as shown in FIG. 5(f) is scanned with the electron beam. FIGS. 5(a) to 5(e) show the intensities of signals arrived where the electron beam diameter ranges from 200 .ANG. to 10 .ANG.. As can be seen from these graphs, the amount of secondary electrons produced in response to the scans which are made with the electron beam of a diameter of 10 .ANG., i.e., under focused condition, is very large at the edge, but the amount is quite small in other locations. On the other hand, in defocused condition, the amount of secondary electrons emanating from the surface portions surrounding the edge is larger than the amount produced in focused condition. This is explained away as follows. In defocused condition, the electron beam spot on the specimen surface has a large diameter and f.sub.o a part of the beam hits the edge if the irradiated position is somewhat remote from the edge. Therefore, in some cases, the value obtained by integrating the output signal from the detector in defocused condition is larger than the value obtained in the above-described focused condition. Consequently, where the above-described automatic focusing apparatus is employed to observe very uneven specimen surfaces, it is impossible to carry out an accurate focusing operation.